export default {
  namespaced: true,
  state: {},
  mutations: {},
  actions: {
    /**
     * 登录
     * @param  {[type]} options.commit   [description]
     * @param  {[type]} options.userName [description]
     * @param  {[type]} options.password [description]
     * @return {[type]}                  [description]
     */
    handleLogin({}, { userName, password }) {
      return new Promise((resolve, reject) => {
        login({
          userName,
          password
        })
          .then(() => {
            resolve();
          })
          .catch(err => {
            reject(err);
          });
      });
    },
    /**
     * 退出登录
     * @param  {[type]} options.state  [description]
     * @param  {[type]} options.commit [description]
     * @return {[type]}                [description]
     */
    handleLogOut() {
      return new Promise(() => {});
    },
    /**
     * 获取用户相关信息
     * @param  {[type]} options.state  [description]
     * @param  {[type]} options.commit [description]
     * @return {[type]}                [description]
     */
    getUserInfo() {
      return new Promise(() => {});
    }
  }
};
